﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <script>
        var now1 = new Date();
        var now2 = new Date(now1.getFullYear(), now1.getMonth(), now1.getDate(), now1.getHours(), now1.getMinutes() - 20, now1.getSeconds());
        var s = parseInt((now1- now2) / 60000);
        alert(s);
    </script>
</body>
</html>